#include <iostream>
using std::cout;
using std::endl;

struct A
{
/* public: */
    ~A(){ cout << "~A()" << endl; }
};

struct B
{
/* public: */
    ~B(){ cout << "~B()" << endl; }
};

class C
{
public:
    ~C(){ cout << "~C()" << endl; }
};

class D
{
public:
    ~D(){ cout << "~D()" << endl; }
};

C c;
int main()
{
    A *pa=new A();
    B b;
    static D d;
    delete pa;
    return 0;
}
